package com.easychat.entity.enums;

/**
 * @Author Dongdong
 * @注释
 */

public enum AppUpdateFileTypeEnum {
    LOCAL(0,"本地"),
    REMOTE(1,"远程");

    private Integer type;
    private String desc;
    AppUpdateFileTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static AppUpdateFileTypeEnum getByType(Integer fileType) {

        for (AppUpdateFileTypeEnum fileTypeEnum : AppUpdateFileTypeEnum.values()) {
            if(fileTypeEnum.getType().equals(fileType)) {
                return fileTypeEnum;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
